
async function load(id) {
        let topbarText = await fetch("/code/web/components/topbar/topbar.html").then(res => res.text())//请求回来的资源需要直接加载到页面，不能用json()解析
        document.querySelector(".topbar").innerHTML = topbarText
        if(id){
                document.querySelector(`#${id}`).style.color = "blueviolet"
        }
}
export {load}